//
//  UIViewController+NavItem.h
//  hotelbrt
//
//  Created by Ron on 5/8/14.
//  Copyright (c) 2014 HGG. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "GGMacros.h"
#define BackButtonImageName @"nav_back"
#define DefaultFontOfNavigationBarTitle [UIFont systemFontOfSize:17]
#define DefaultTextColorOfNavigationBarTitle RGB(77,77,77)
#define DefaultTextColorOfNavigationItem RGB(207,33,45)

@interface UIViewController (NavItem)

/**
 *  config back action of UINavigationItem
 *
 *  @param action block
 */
- (void)configNavigationBackAction:(voidBlock)action;
/**
 *  config left UINavigationItem, the object must be NSString or UIImage object
 *
 *  @param object must be NSString or UIImage object
 *  @param action block
 */
- (void)configNavigationLeftItemWith:(id)object andAction:(voidBlock)action;

/**
 *  config right UINavigationItem, the object must be NSString or UIImage object
 *
 *  @param object must be NSString or UIImage object
 *  @param action block
 */
- (void)configNavigationRightItemWith:(id)object andAction:(voidBlock)action;

/**
 *  config left UINavigationItem with text and font
 *
 *  @param text NSString object
 *  @param action block
 */
- (void)configNavigationLeftString:(NSString*)text textFont:(UIFont*)font andAction:(voidBlock)action;

- (void)configNavigationItemString:(NSString*)text withFont:(UIFont*)font leftOrRight:(BOOL)left andAction:(voidBlock)action withColor:(UIColor*)color;
/**
 *  config right UINavigationItem with text and font
 *
 *  @param text NSString object
 *  @param action block
 */
- (void)configNavigationRightString:(NSString*)text textFont:(UIFont*)font andAction:(voidBlock)action;

- (void)configNavigationRightString:(NSString*)text textFont:(UIFont*)font textColor:(UIColor*)color andAction:(voidBlock)action;

- (void)configNavigationRightItem1:(NSString*)text1
                         textFont1:(UIFont*)font1
                        textColor1:(UIColor*)color1
                        andAction1:(voidBlock)action1
                             Item2:(NSString*)text2
                         textFont2:(UIFont*)font2
                        textColor2:(UIColor*)color2
                        andAction2:(voidBlock)action2;

- (void)configNavigationRightItemWithImages:(UIImage*)image :(UIImage*)image2 andAction:(voidBlock)action :(voidBlock)action2;

- (void)configNavigationBarTintColor:(UIColor*)color;

- (void)configNavigationBarTitleAppearance;

- (void)configDefaultNavigationBarStyle;

- (void)configNavigationBarLine:(BOOL)hidden;

- (UIImageView *)findHairlineImageViewUnder:(UIView *)view;

-(void)configNavigationLeftItemWithCustom:(id)object andAction:(voidBlock)action;

//自定义返回白色按钮
- (void)settingLeftBarButtonItem;

@end
